package funjava;

/**
 * Created by judasnow on 5/11/16.
 */
public class C1_4 {
    static public double c1_4(double d) {
        // nextUp 反回的是最近的浮点值 只要不停的循环 就可以得到最大的正值
        return Math.nextUp(d);
    }
    public static void main (String[] args) {
        double d = 0;
        do {
            d = c1_4(d);
            System.out.println(d);
        } while (d < Double.POSITIVE_INFINITY);
    }
}
